package com.merchant.document.controller.brand;


import com.merchant.document.entity.*;
import com.merchant.document.util.SystemUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
//@RequestMapping("brand")
@Api("品牌类")
public class BrandController {


    @Autowired
    private SystemUtil systemUtil;
    @RequestMapping(value = "brand.project.list",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(value = "查询推荐品牌信息",notes = "查询推荐品牌信息")
    public Result recomendBrandList(){
        List<Brand> brandList = new ArrayList<Brand>();
        brandList.add(new Brand());
        brandList.add(new Brand());
        return  new Result(true,"操作成功",brandList);
    }

    @RequestMapping(value = "brand.project.getBrandListByName",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(value = "通过名称来查询品牌信息",notes = "通过名称来查询品牌信")
    @ApiImplicitParam(name = "brandName",value = "品牌名称",dataType = "java.util.string")
    public Result getBrandListByName(String brandName){
        List<Brand> brandList = new ArrayList<Brand>();
        brandList.add(new Brand());
        return  new Result(true,"操作成功",brandList);
    }

    @RequestMapping(value = "brand.project.getExpandDetail",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(value = "通过品牌ID查找拓展需求以及品牌信息",notes = "通过品牌ID查找拓展需求以及品牌信息")
    @ApiImplicitParam(name = "brandId",value = "品牌ID",dataType = "java.util.string")
    public Result getExpandDetail(String brandId){
        Map<String,Object> data = new HashMap<String,Object>();
        data.put("brand",new Brand());
        //方法省略通过品牌ID查找品牌扩展
        data.put("brandExpand",new BrandExpand());
        return  new Result(true,"操作成功",data);
    }


    @RequestMapping(value = "brand.project.moreRecommendBrandList",method = RequestMethod.POST)
    @ResponseBody
    @ApiOperation(value = "查看更多品牌信息",notes = "查看更多品牌信息")
    public Result getMoreRecommendBrandList(){
        Map<String,Object> data = new HashMap<String,Object>();
        List<Brand> brandList = new ArrayList<Brand>();
        brandList.add(new Brand());
        brandList.add(new Brand());
        data.put("brandList",brandList);
        //省略通过区域ID,业态类型获取的基础数据
        data.put("sysEnums",systemUtil.getSysParaByType("1"));
        return  new Result(true,"操作成功",data);
    }












}